// pages/login/index.js
Page({
  handleGetUserInfo(e) {
    // console.log(e);
    const { userInfo } = e.detail;
    wx.setStorageSync("userinfo", userInfo);
    wx.cloud.callFunction({
      name: "get_open_id",
      success: res => {
        wx.setStorageSync('id', res.result.openid );
        wx.navigateBack({
          delta: 1
        });
      },
      fail: err => console.log(err)
    })
   
    //获取图片下载权限
    wx.authorize({
      scope: 'scope.writePhotosAlbum',
      complete() {

      }
    });
    
  }
})